# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2023年03月20日
"""
import openpyxl
myBook = openpyxl.load_workbook('成绩表.xlsx')
mySheet=myBook.active

myRange=mySheet.iter_rows(min_row=2,min_col=1)
for myRow in myRange:
	myRowSum=sum([myCell.value for myCell in myRow[1:6]])
	if myRowSum>400:
		myRow[-1].value='一等奖学金'
	elif myRowSum >350:
		myRow[-1].value='二等奖学金'
	else:
		myRow[-1].value='三等奖学金'

myBook.save('结果表-成绩表.xlsx')
